import {View, Text, StyleSheet, TextInput, TextStyle, ViewStyle, TextInputProps} from 'react-native'
import React, {Component} from 'react'
import styles, {padding} from "../../style/index";

export interface InputCellProps {
    style?:ViewStyle,
    input:TextInputProps,
    label: {
        style?: TextStyle,
        text: string
    }

}

interface InputCellState {

}


export default class InputCell extends Component<InputCellProps, InputCellState> {


    constructor(props: InputCellProps) {
        super(props);
    }

    render() {
        const {input, label,style} = this.props;
        return (<View style={[{
            height: 46,
            marginTop: 1,
            backgroundColor: "#fff"
        }, styles.flexDirectionRowNotFlex, styles.centerH, padding(0, 26),style]}>
            <Text style={[{fontSize: 14, color: "#333333"}, styles.flex, label.style]}>{label.text}</Text>
            <TextInput autoCorrect={false} autoCapitalize={"none"}  underlineColorAndroid={"transparent"}  {...input} style={[{width: 208, marginLeft: 26},padding(0), input.style]}/>
        </View>)
    }
}

const style = StyleSheet.create({
    container: {}
});

 